﻿// create a collection

IEnumerable<string> messages;
messages = new List<string>()
{
    "How are you",
    "Have a great day",
    "Thanks"
};

// foreach
foreach (string item in messages)
{
    Console.WriteLine(item);
}

Console.ReadKey();